package com.da.javatest.niuke.baodian;

/**
 * @author chenlida
 * @date 2020/10/12 15:36
 * https://www.nowcoder.com/practice/bb06495cc0154e90bbb18911fd581df6?tpId=8&tags=&title=&diffculty=0&judgeStatus=0&rp=1
 */
public class C60AntiOrder {
    public int count(int[] A, int n) {
        int count = 0;
        for (int i = 1; i < A.length; i++) {
            for (int j = 0; j < i; j++) {
                if (A[j] > A[i]) {
                    count++;
                }
            }
        }
        return count;
    }
}
